-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix/put on busy shards #2965
Fix/put on busy shards #2965
Conversation
0f8b19e
to
03f1f87
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2965 +/- ##
==========================================
+ Coverage 22.85% 22.87% +0.01%
==========================================
Files 791 791
Lines 58603 58688 +85
==========================================
+ Hits 13395 13425 +30
- Misses 44312 44366 +54
- Partials 896 897 +1 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
13b546f
to
12246c2
Compare
Well, it works. There is not much we can do about testing currently. It is hard to test in general because it is time-dependent. But it is quite straightforward code, and the tests are okay. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's an improvement, but channels/routines would be even better.
} | ||
|
||
func (e *StorageEngine) putToShardWithDeadLine(sh hashedShard, ind int, pool util.WorkerPool, addr oid.Address, prm PutPrm) error { | ||
const deadline = 30 * time.Second |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make it configurable? Treat zero as old behavior?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you mean node's config? one more value that no one knows what to pick?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. This directly affects the reply latency. The other option of course is to check if we have any other timeout value that can be reused.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
np
@roman-khimov, what do you mean by that? Sending tasks via channels to every shard? What is the difference? |
How can I get a "block for 30s" behavior with a pool? How can I get a queue with a pool? That's the difference. |
|
Signed-off-by: Pavel Karpy <[email protected]>
12246c2
to
5110450
Compare
If every shard's pool is overloaded with routines, choose the best one and try to PUT an object to it 30 seconds. Closes #2871. Signed-off-by: Pavel Karpy <[email protected]>
5110450
to
c54d353
Compare
Missing (zero) value just keeps the old behavior (no retries at all). Signed-off-by: Pavel Karpy <[email protected]>
No description provided.